package com.example.shirospringboottest.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class PageController {

    @RequestMapping("/{page}")
    public String page(@PathVariable String page) {
        System.out.println("page = " + page);
        return page;
    }

    /**
     * 销售管理
     * @param page
     * @return
     */
    @RequestMapping("/client/{page}")
    public String pageInside(@PathVariable String page) {
        return "client/"+page;
    }

    /**
     * 任务管理
     * @param page
     * @return
     */
    @RequestMapping("/task/{page}")
    public String pageTask(@PathVariable String page) {
        return "task/"+page;
    }
}
